package com.itheima.health.service;

import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.exception.HealthException;
import com.itheima.health.pojo.Role;

import java.util.List;

/**
 * 包名：com.itheima.health.service
 *
 * @author zy
 * @date 2020 -09-05 14:50
 */
public interface RoleService {
    /**
     * 查询所有角色
     * @return
     */
    List<Role> findAll();

    PageResult<Role> findPage(QueryPageBean queryPageBean);

    void add(Role role, Integer[] permissionIds, Integer[] menuIds);

    void deleteById(int id)throws HealthException;

    Role findById(int id);

    List<Integer> findMenuIdsByRoleId(int id);

    List<Integer> findPermissionIdsByRoleId(int id);

    void update(Role role, Integer[] permissionIds, Integer[] menuIds);
}
